$(function() {
  var bg = chrome.extension.getBackgroundPage();
  var domain = bg.getDomain();
  if (domain !== null) {
    $('#domain').val(localStorage.domain);
  }

  $('#domain').change(function() {
    console.log('change')
    var bg = chrome.extension.getBackgroundPage();
    bg.setDomain($(this).val());
  })
});


